<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<div>
    <!--<script>-->
        <!--var audioElement=document.creatElement('audio')-->
        <!--var url=".audio/v1.ogg";-->
        <!--audioELement.setAttribute('src',url);-->

        <!--audioElement.load();-->
        <!--audioElement.play();-->
    <!--</script>-->
    <audio controls>
    <source src="./audio/何亚优　　＊_入戏太深.ogg" type="audio/ogg">
    <source src="http://music.baidu.com/song/1077102?from=fm" type="audio/mpeg">

    </audio>
</div>

<button class="btn">
    按钮
</button>


<div style="width:300px; margin-left:auto; margin-right:auto; margin-top:100px; font-size:50px; text-align:center;">
    <div id="clock">
        --:--:--
    </div>
    <input type="number" id="input"/>
    <button onclick="timing()">开始计时</button>
</div>
<script>

    //获取现在的时间
    function kata() {
        var date = new Date();
        var h = date.getHours();
        var m = date.getMinutes();
        var s = date.getSeconds();

        //把时间加起来准备放到页面上
        var time = h + ":" + m + ":" + s;

        //获取元素
        var clock = document.getElementById("clock");

    clock.innerText=time;

    }
    kata();
    setInterval(kata,1000)

    function timing() {
        var input = document.getElementById("input")
        var time = input.value;
        setTimeout(Do, time);
        function Do(){
            rrrr()
            alert("时间到！")
        }

    }
    function rrrr() {
        var audioElement = document.createElement('audio');
        var url = ".audio/何亚优　　＊_入戏太深.ogg";
        audioELement.setAttribute('src', url);
        audioElement.load();
        audioElement.play();
    }





</script>

</body>
</html>